package com.wang.JinDong2;

/**
 * 商品实体类
 */
public abstract class Product {
    //编号
    private int id;
    //商品名称
    private String name;
    //商品价格
    private int price;
    //商品颜色
    private String color;
    //商品尺寸
    private int size;


    public Product() {

    }

    public Product(int id, String name, int price, String color, int size) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.color = color;
        this.size = size;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    //商品信息展示
    public void show(){
        System.out.print(id+"\t"+name+"\t\t"+price+"\t\t"+color+"\t\t"+size+"\t\t");
    }

}
